<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2023/9/5
  Time: 16:04
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <title>UpdateUser</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        body {
            background-color: lightgray;
            text-align: center;
        }
        form{
            font-size: larger;
        }
        label{
            padding: 20px 0 20px 20px ;
        }
        input{
            width: 200px;
            height: 50px;
            margin: 10px;
            border-radius: 10px;
            text-align: center;
            font-size: larger;
        }
    </style>
</head>

<body>
<h1>修改用户信息</h1>
<form action="${pageContext.request.contextPath }/updateUser" method="post">
    <div>
        <input type="hidden" id="id" name="id" value="${user.id}" readonly>
        <label>账号：</label>
        <input type="text" value="${user.user_name}" name="user_name" readonly>
        <br>
        <label>密码：</label>
        <input type="text" value="${user.password}" name="password" readonly>
        <br>
        <label>姓名：</label>
        <input type="text" value="${user.real_name}" name="real_name">
        <br>
        <label>生日：</label>
        <%--            <input type="date" value="${user.birthday}" readonly>--%>
        <input type="date"
               value="<fmt:formatDate value='${user.birthday}' pattern='yyyy-MM-dd' />" name="birthday">
        <br>
        <label>电话：</label>
        <input type="text" value="${user.phone}" name="phone">
        <br>
        <label>地址：</label>
        <input type="text" value="${user.address}" name="address">
        <br>
        <input style="width: 150px" type="submit" value="提交">
        <br>
        <h3><a href="/toUser">返回用户中心</a></h3>

    </div>
</form>
</body>
</html>
